package com.sais.manage.boot.daily.dto;

import com.sais.manage.boot.daily.entity.Visitor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;

/**
 * 宿舍管理平台-宿舍楼保存DTO
 *
 * @author zwp
 * @date 2020/2/2
 */
@Data
@NoArgsConstructor
public class VisitorSaveDTO {

    private String ukId;
    private String roomId;
    private String visitorName;
    private String visitedName;
    private String phone;
    private String reason;
    private LocalDateTime visitTime;

    public Visitor convert() {
        Visitor visitor = new Visitor();
        BeanUtils.copyProperties(this, visitor);
        return visitor;
    }

}
